{
  "name": "My workflow",
  "nodes": [
    {
      "parameters": {},
      "id": "6834c248-e9db-406e-82fa-54146e3cfc3d",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -752,
        -192
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "content": "## Scrape latest Paul Graham essays",
        "height": 285.66037735849045,
        "width": 1071.752021563343
      },
      "id": "d138869c-7e83-4680-9d10-803059743785",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -304
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "content": "## Summarize them with GPT",
        "height": 607,
        "width": 625
      },
      "id": "52f79da1-42ed-4160-961b-90b0ffd0c03c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        -304
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "url": "http://www.paulgraham.com/articles.html",
        "options": {}
      },
      "id": "a53b6d8e-d41a-46e9-b65f-bbc46b19eb08",
      "name": "Fetch Essay List",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -464,
        -192
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "id": "c67bf86a-3548-4401-8cea-39955c7d0b10",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        800,
        32
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "essay",
              "cssSelector": "table table a",
              "returnValue": "attribute",
              "attribute": "href",
              "returnArray": true
            }
          ]
        },
        "options": {}
      },
      "id": "e93b2d09-73b2-459d-b207-38a1fb09d697",
      "name": "Extract essay names",
      "type": "n8n-nodes-base.html",
      "position": [
        -272,
        -192
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "fieldToSplitOut": "essay",
        "options": {}
      },
      "id": "d1e32a67-8912-4f1e-b412-13b35864ed21",
      "name": "Split out into items",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -64,
        -192
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "url": "=http://www.paulgraham.com/{{ $json.essay }}",
        "options": {}
      },
      "id": "ab9fe0e0-8468-4a1d-9a44-0ffc8d45b7ef",
      "name": "Fetch essay texts",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        336,
        -192
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            }
          ]
        },
        "options": {}
      },
      "id": "59958cfa-c457-4e74-b94a-723eae61286f",
      "name": "Extract title",
      "type": "n8n-nodes-base.html",
      "position": [
        832,
        -496
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "operationMode": "documentLoader",
        "options": {}
      },
      "id": "784ec760-6353-4b11-93f4-2796dd33cf34",
      "name": "Summarization Chain",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        832,
        -192
      ],
      "typeVersion": 2
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7b337b47-a1c6-470e-881f-0c038b4917e5",
              "name": "title",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "ca820521-4fff-4971-84b5-e6e2dbd8bb7a",
              "name": "summary",
              "type": "string",
              "value": "={{ $json.response.text }}"
            },
            {
              "id": "0fd9b5e3-44dd-49a3-82c1-3a4aa4698376",
              "name": "url",
              "type": "string",
              "value": "=http://www.paulgraham.com/{{ $('Limit to first 3').first().json.essay }}"
            }
          ]
        },
        "options": {}
      },
      "id": "569028b1-f64b-43f5-8265-388a1b797343",
      "name": "Clean up",
      "type": "n8n-nodes-base.set",
      "position": [
        1536,
        -192
      ],
      "typeVersion": 3.4
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "id": "df59c5cd-c459-4ad3-888f-e7c444f83cfd",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1344,
        -192
      ],
      "typeVersion": 3
    },
    {
      "parameters": {
        "jsonMode": "expressionData",
        "jsonData": "={{ $('Extract Text Only').item.json.data }}",
        "options": {}
      },
      "id": "dbd3ad03-022b-499b-97ef-812355acf2ca",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        912,
        32
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "chunkSize": 6000,
        "options": {}
      },
      "id": "fdce7586-ff65-486e-9737-9b32ef546d6e",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        992,
        144
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "maxItems": 3
      },
      "id": "0f3bf1d0-aaa8-4a94-b0ad-610c1d70fd27",
      "name": "Limit to first 3",
      "type": "n8n-nodes-base.limit",
      "position": [
        128,
        -192
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "data",
              "cssSelector": "body",
              "skipSelectors": "img,nav"
            }
          ]
        },
        "options": {}
      },
      "id": "ec9707ef-02d2-4c41-a4a1-5afb7b1caf7b",
      "name": "Extract Text Only",
      "type": "n8n-nodes-base.html",
      "position": [
        656,
        -192
      ],
      "typeVersion": 1.2
    }
  ],
  "pinData": {},
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Clean up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract title": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Essay List": {
      "main": [
        [
          {
            "node": "Extract essay names",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit to first 3": {
      "main": [
        [
          {
            "node": "Fetch essay texts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text Only": {
      "main": [
        [
          {
            "node": "Summarization Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch essay texts": {
      "main": [
        [
          {
            "node": "Extract title",
            "type": "main",
            "index": 0
          },
          {
            "node": "Extract Text Only",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarization Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Summarization Chain",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Extract essay names": {
      "main": [
        [
          {
            "node": "Split out into items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarization Chain": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split out into items": {
      "main": [
        [
          {
            "node": "Limit to first 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Fetch Essay List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "67fb1839-c0fd-48fb-8b72-29d89f172edf",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "108ca395ced197c6477117d33be04fdbb054b19068f57471dcf11fcb19567da0"
  },
  "id": "ullZK5zc0t-Q5w-2B_z0n",
  "tags": []
}